package com.casstime.ec.cloud.discount.util;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import com.casstime.commons.service.exception.HttpMessageException;
/**
 * 
 * ClassName: CassAssert 
 * Function: 用来处理一些断言，适配公司的需求抛出HttpMessageException
 * Reason: ADD REASON(可选).
 *  
 * @author caiguoda
 * 2017年7月12日 下午5:31:09
 * @version   
 * @since JDK 1.8
 */
public class CassAssert {
	private static Logger logger = LoggerFactory.getLogger(CassAssert.class);
	/**
	 * 
	 * isNull:null判断.
	 * @param object
	 * @author 蔡国达
	 * @date 2017年7月12日 下午5:32:53
	 */
	public static void isNotNull(Object object, int httpCode, String msg) {
		if (object == null) {
			logger.error(msg);
			throw new HttpMessageException(httpCode, msg);
		}
		
	}
}
